package com.study.project.service.impl;

import javax.annotation.Resource;

import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Service;

import com.study.project.service.MessageQueueService;

/**
 * @program: studyProject
 * @see:
 * @author: yangjie
 * @create: 2024-04-13 15:58
 **/
@Service
public class MessageQueueServiceImpl implements MessageQueueService {
    @Resource
    private KafkaTemplate<String, Object> kafkaTemplate;

    @Override
    public void sendMessage(String topic, String message) {
        kafkaTemplate.send(topic, message);
    }
}